#include "telbook.h"

int main(int argc, char *argv[])
{     
  if(argc == 1)
  {
   myusage('e'); //printing usage message
  }
  
  if(argv[1][2]!= '\0')
   myusage('e');
  switch(argv[1][1])
  {
   case 'c': if(argc!=CARGS)
             myusage('c');
             create_book(argv);
             break;                     
   case 'w':if(argc!=WARGS)
             myusage('w');
             write_entry(argv);
             break;
   case 'r':if(argc!=RARGS)
             myusage('r');
             read_entry(argv);
             break;

   default:printf("Only three switches: -c, -w , -r\n");
  }
}  
                          
